package com.gp.study.mybatis;

import com.gp.study.mybatis.mapper.User;
import com.gp.study.mybatis.mapper.UserMapper;
import com.gp.study.mybatis.session.SqlSession;
import com.gp.study.mybatis.session.SqlSessionFactory;

public class TestMybatis {

	public static void main(String[] args) {
		
		SqlSessionFactory sqlSessionFactory = new SqlSessionFactory();
		SqlSession sqlsession = sqlSessionFactory.build().openSqlSession();
		UserMapper mapper = sqlsession.getMapper(UserMapper.class);
		User user = mapper.getUserByName("张三");
		System.out.println(user);
	}

}
 